using System;

namespace Tarkin.InfrastructureLibrary.Core.Basic
{
    /// <summary>
    /// The EnumerationLiteral class is the implementation of the EnumerationLiteral metaclass 
    /// class as defined by section 10.3.2 of the Unified Modeling Language: Infrastructure 
    /// specfication (version 2.1.1, dated 07-02-06).
    /// </summary>
    /// <remarks>Tarkin classes are NOT thread-safe.</remarks>
    public class EnumerationLiteral : NamedElement
    {

#region Private Members

        /// <summary>
        /// The enumeration that this literal belongs to.
        /// </summary>
        private Enumeration enumeration = null;

#endregion


#region Constructors

        /// <summary>
        /// Default constructor.
        /// </summary>
        public EnumerationLiteral ()
        { }

        /// <summary>
        /// Overloaded constructor.
        /// </summary>
        /// <param name="name">The string value of the EnumerationLiteral.</param>
        public EnumerationLiteral ( string name ) : base ( name )
        { }

        /// <summary>
        /// Overloaded constructor.
        /// </summary>
        /// <param name="name">The string value of the EnumerationLiteral.</param>
        /// <param name="enumeration">The enumeration that the literal belongs to.</param>
        public EnumerationLiteral ( string name,
                                    Enumeration enumeration ) : base ( name )
        {
            Enumeration = enumeration;
        }

#endregion


#region Public Properties

        /// <summary>
        /// The enumeration that this literal belongs to.
        /// </summary>
        public Enumeration Enumeration
        {
            get
            {
                return enumeration;
            }

            set
            {
                enumeration = value;
            }
        }

#endregion

    }
}
